package com.drugstore.drugstore.service.impl;

import com.drugstore.drugstore.domain.Salesreport;
import com.drugstore.drugstore.mapper.SalesreportMapper;
import com.drugstore.drugstore.service.ISalesreportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Service业务层处理
 * 
 * @author 
 * @date 2025-05-08
 */
@Service
public class SalesreportServiceImpl implements ISalesreportService
{
    @Autowired
    private SalesreportMapper salesreportMapper;

    /**
     * 查询
     * 
     * @param id 主键
     * @return 
     */
    @Override
    public Salesreport selectSalesreportById(Long id)
    {
        return salesreportMapper.selectSalesreportById(id);
    }

    /**
     * 查询列表
     * 
     * @param salesreport 
     * @return 
     */
    @Override
    public List<Salesreport> selectSalesreportList(Salesreport salesreport)
    {
        return salesreportMapper.selectSalesreportList(salesreport);
    }

    /**
     * 新增
     * 
     * @param salesreport 
     * @return 结果
     */
    @Override
    public int insertSalesreport(Salesreport salesreport)
    {
        return salesreportMapper.insertSalesreport(salesreport);
    }

    /**
     * 修改
     * 
     * @param salesreport 
     * @return 结果
     */
    @Override
    public int updateSalesreport(Salesreport salesreport)
    {
        return salesreportMapper.updateSalesreport(salesreport);
    }

    /**
     * 批量删除
     * 
     * @param ids 需要删除的主键
     * @return 结果
     */
    @Override
    public int deleteSalesreportByIds(Long[] ids)
    {
        return salesreportMapper.deleteSalesreportByIds(ids);
    }

    /**
     * 删除信息
     * 
     * @param id 主键
     * @return 结果
     */
    @Override
    public int deleteSalesreportById(Long id)
    {
        return salesreportMapper.deleteSalesreportById(id);
    }
}
